/**
 * 使用示例
 */
import {request2} from "../index";

interface ICity{
    data: any
}

request2.request<ICity>({
    url: "/city/all",
    interceptors: {
        reqSuccessCallback: (config) => {
            console.log(`${config.url}请求拦截成功`)
            return config
        },
        resSuccessCallback: (res) => {
            console.log(`响应拦截成功`)
            return res
        }
    }

}).then(res => {
    console.log(res);
})
